var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(e, t) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(e, t) {
        e.__proto__ = t;
    } || function(e, t) {
        for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
    })(e, t);
}, function(e, t) {
    function n() {
        this.constructor = e;
    }
    o(e, t), e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype, 
    new n());
}), a = this && this.__decorate || function(e, t, n, o) {
    var r, i = arguments.length, c = i < 3 ? t : null === o ? o = Object.getOwnPropertyDescriptor(t, n) : o;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) c = Reflect.decorate(e, t, n, o); else for (var l = e.length - 1; 0 <= l; l--) (r = e[l]) && (c = (i < 3 ? r(c) : 3 < i ? r(t, n, c) : r(t, n)) || c);
    return 3 < i && c && Object.defineProperty(t, n, c), c;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("PersonView"), s = e("LoadManager"), c = cc._decorator, l = c.ccclass, d = c.property, u = function(t) {
    function e() {
        var e = null !== t && t.apply(this, arguments) || this;
        return e.personView = null, e.levelSprite = null, e.infoLabel = null, e;
    }
    return i(e, t), e.prototype.start = function() {}, e.prototype.init = function(e, t) {
        null != e.personIdx && null != e.gunIdx && this.personView.init(e.personIdx, e.gunIdx, e.backEquipIdx, e.headEquipIdx), 
        null != t && s.default.getInstance().loadSpriteFrame({
            url: "image/level/" + t,
            sprite: this.levelSprite
        }), e.nickname && (this.infoLabel.string = (e.nickname ? 5 < e.nickname.length ? e.nickname.substr(0, 5) + "..." : e.nickname : "匿名") + "\n武器LV：" + (e.gunIdx + 1));
    }, a([ d(r.default) ], e.prototype, "personView", void 0), a([ d(cc.Sprite) ], e.prototype, "levelSprite", void 0), 
    a([ d(cc.Label) ], e.prototype, "infoLabel", void 0), a([ l ], e);
}(cc.Component);

n.default = u;